package com.example;

import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * @Author wangfeng
 * @Description
 * @Date 2021/11/11
 **/
public class ConstantConfig {
	private static int timeout;

	private static int batch;

	@Value("${batch:200}")
	public void setBatch(int batch) {
		ConstantConfig.batch = batch;
	}

	public static int getBatch() {
		return batch;
	}

	@Value("${timeout:500}")
	public void setTimeout(int timeout) {
		ConstantConfig.timeout = timeout;
	}

	public static int getTimeout() {
		return timeout;
	}
}
